<!DOCTYPE html>
<html lang="ru-RU">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">	
        <meta name="keywords" content="">
        <meta name="description" content="">
        <meta name="author" content="Trumplin.net Dev Team">
        <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=no, maximum-scale=1.0">
        <meta name="HandheldFriendly" content="True">
        <title></title>
        <link href='http://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic&amp;subset=latin,cyrillic' rel='stylesheet' type='text/css'>
        <link href='http://fonts.googleapis.com/css?family=Istok+Web:400,400italic,700,700italic&amp;subset=latin,cyrillic' rel='stylesheet' type='text/css'>
        <link href="<?php echo Yii::app()->theme->baseUrl; ?>/css/styles.css" rel="stylesheet" type="text/css">
        <script src="<?php echo Yii::app()->theme->baseUrl; ?>/js/amcharts.js" type="text/javascript"></script>
        <script src="<?php echo Yii::app()->theme->baseUrl; ?>/js/serial.js" type="text/javascript"></script>
        <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->	
        <!--<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>-->
        <script type="text/javascript">
            $(function() {
                $("#add-new-city").click(function() {
                    //get ready all fields
                    $("#city-popup-content > p").text("Добавить город");
                    $("input[name=city-action]").val("add");
                    $("#city-popup-add-button").text("Добавить");
                    $("input[name=city-title]").val("");
                    $("input[name=price-per-day]").val("");
                    $("textarea[name=city-content]").val("");
                    //

                    $("#city-popup").removeClass("hidden");
                    var h = $(window).height();
                    var w = $("#main-content").width();
                    var h1 = $("#city-popup").height();
                    var w1 = $("#city-popup").width();
                    var a = $(window).width();
                    if (a >= 980) {
                        var w2 = $("#left-sidebar").width();
                        w += 40;
                        w2 += 40; //40-padding 20px
                        $("#city-popup").css("top", h / 2 - h1 / 2);
                        $("#city-popup").css("left", (w / 2 - w1 / 2) + w2);
                    } else {
                        $("#city-popup").css("top", h / 2 - h1 / 2);
                        $("#city-popup").css("left", w / 2 - w1 / 2);
                    }
                });
            });
        </script>
        <script type="text/javascript">
            $(function() {
                $("#close-popup").click(function() {
                    $("#city-popup").addClass("hidden");
                });
            });
        </script>
        <script type="text/javascript">
            $(document).keydown(function(e) {
                if (e.keyCode == 27) {
                    var a = $("#city-popup").hasClass("hidden");
                    if (a == false) {
                        $("#city-popup").addClass("hidden");
                    }
                }
            });
        </script>
        <script type="text/javascript">
            $(function() {
                $("#add-new-message").click(function() {
                    $("#news-popup").removeClass("hidden");
                    var h = $(window).height();
                    var w = $("#main-content").width();
                    var h1 = $("#news-popup").height();
                    var w1 = $("#news-popup").width();
                    var a = $(window).width();
                    if (a >= 980) {
                        var w2 = $("#left-sidebar").width();
                        w += 40;
                        w2 += 40; //40-padding 20px
                        $("#news-popup").css("top", h / 2 - h1 / 2);
                        $("#news-popup").css("left", (w / 2 - w1 / 2) + w2);
                    } else {
                        $("#news-popup").css("top", h / 2 - h1 / 2);
                        $("#news-popup").css("left", w / 2 - w1 / 2);
                    }
                });
            });
        </script>
        <script type="text/javascript">
            $(function() {
                $("#close-popup").click(function() {
                    $("#news-popup").addClass("hidden");
                });
            });
        </script>
        <script type="text/javascript">
            $(document).keydown(function(e) {
                if (e.keyCode == 27) {
                    var a = $("#news-popup").hasClass("hidden");
                    if (a == false) {
                        $("#news-popup").addClass("hidden");
                    }
                }
            });
        </script>
        <script type="text/javascript">
            function handleHeight() {
                var h = $(document).height();
                var h1 = $("#left-sidebar").height();
                h = h - 40;
                h1 = h1 - 40;
                if (h <= h1) {
                    $("#main-content").css("height", h1);
                } else
                {
                    $("#main-content").css("height", "100%");
                }
            }
        </script>	
        <script type="text/javascript">
            $(function() {
                $("#no-js-warning").addClass("hidden");
                handleHeight();
                var n = navigator.appVersion;
                var p = n.indexOf("WebKit");
                if (p >= 0) {
                    $("div.select-style").addClass("webkiteng");
                }
            });
        </script>
        <script type="text/javascript">
            $(function() {
                $(window).resize(function() {
                    handleHeight();
                });
            });
        </script>
        <script type="text/javascript">
            $(function() {
                $(window).keydown(function() {
                    handleHeight();
                });
            });
        </script>
        <script type="text/javascript">
            $(function() {
                $(window).click(function() {
                    handleHeight();
                });
            });
        </script>
        <script>
            $(function() {
                var a = $("span.unread-items-count-text");
                var b = a.parent();
                var c = a.text();
                if ($.trim(c) == "0") {
                    b.addClass("hidden");
                } else {
                    if ($.trim(c) == "") {
                        b.addClass("hidden");
                    }
                }
            });
        </script>
        <script type="text/javascript">
            $(function() {
                $("#admin-area-sidebar-nav li a").hover(function() {
                    var a = $(this).find("img");
                    var b = a.attr("class");
                    var c = b + "-hovered";
                    a.removeClass(b);
                    a.addClass(c);
                }, function() {
                    var a = $(this).find("img");
                    var b = a.attr("class");
                    var c = b.replace("-hovered", "");
                    a.removeClass(b);
                    a.addClass(c);
                });
            });
        </script>

        <script type="text/javascript">
            function resetTableCheckboxes() {
                $("table.admin-area-table input.table-checkbox").each(function() {
                    $(this).prop("checked", false);
                });
            }
        </script>
        <script type="text/javascript">
            function setTableCheckboxes() {
                $("table.admin-area-table input.table-checkbox").each(function() {
                    $(this).prop("checked", true);
                });
            }
        </script>
        <script type="text/javascript">
            $(function() {
                $("#checkbox-head").click(function() {
                    if ($(this).prop("checked")) {
                        setTableCheckboxes();
                    } else {
                        resetTableCheckboxes();
                    }
                });
            });
        </script>
        <script type="text/javascript">
            $(function() {
                $("select[name=tow-state]").change(function() {
                    var a = $("table tbody").find("input[type=checkbox]:checked").attr("id");
                    if ($.trim(a) != "") {
                        $("form[name=admin-area-tows-form]").submit();
                    } else {
                        return false;
                    }
                });
            });
        </script>
        <script type="text/javascript">
            $(function() {
                $("select").focus(function() {
                    var a = $(this).parent();
                    a.addClass("select-focused");
                });
                $("select").focusout(function() {
                    var a = $(this).parent();
                    a.removeClass("select-focused");
                });
            });
        </script>	
    </head>
    <body>
        <div id="wrapper">
            <div id="no-js-warning"><p>Внимание! Ваш браузер не поддерживает JavaScript либо данная возможность отключена. Настоятельно рекомендуется исправить ситуацию для корректного отображения сайта.</p></div>
            <div id="left-sidebar">
                <a href="http://towing.su"><img id="logo" src="/adminarea/img/adminlogo.png" alt="Главная" title="Главная"></a>
                <ul id="admin-area-sidebar-nav">
                    <li>
                        <a href="/manage" class="active-item">
                            <img class="icon-1" src="/adminarea/img/icon.png">
                            <span>Главная</span>
                        </a>
                        <?php if ($this->unreadMessages() > 0): ?>
                            <span class="unread-items">
                                <span class="unread-items-count">
                                    <span class="unread-items-count-text"><?php echo $this->unreadMessages(); ?></span>
                                </span>
                            </span>
                        <?php endif; ?>
                    </li>
                    <li>
                        <a href="/manage/news"><img class="icon-2" src="/adminarea/img/icon.png"><span>Новости</span></a>
                    </li>				
                    <li>
                        <a href="/manage/costs"><img class="icon-3" src="/adminarea/img/icon.png"><span>Расходы пользователей</span></a>
                    </li>
                    <li>
                        <a href="/manage/promocodes"><img class="icon-4" src="/adminarea/img/icon.png"><span>Промокоды</span></a>
                    </li>
                    <li>
                        <a href="/manage/users/funds"><img class="icon-5" src="/adminarea/img/icon.png"><span>Пополнения счета</span></a>
                    </li>
                    <li>
                        <a href="/manage/users"><img class="icon-6" src="/adminarea/img/icon.png"><span>Пользователи</span></a>
                    </li>
                    <li>
                        <a href="/manage/cities"><img class="icon-7" src="/adminarea/img/icon.png"><span>Города</span></a>
                    </li>
                    <li>
                        <a href="/site/logout"><img class="icon-8" src="/adminarea/img/icon.png"><span>Выйти</span></a>
                    </li>
                </ul>
                <div class="clear"></div>
                <p id="admin-area-sidebar-balance">На Вашем балансе <span>$242,45</span></p>			
            </div>
            <div id="main-content">
                <?php echo $content; ?>
            </div>
        </div>
    </body>
</html>